package com.molichuxing.services.business.service;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.exception.BizException;
import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.business.dto.request.create.OrderRenegeCreateBizDto;
import com.molichuxing.services.business.dto.request.create.RecycleCarsCreateBizDto;
import com.molichuxing.services.business.dto.request.modify.*;
import com.molichuxing.services.business.dto.response.OrderRenegeBizDto;
import com.molichuxing.services.infrastructure.dto.response.OrderNegotiateRenegeDto;

import java.util.Map;

/**
 * 订单退租(违约)biz service
 *
 * @author zoumingyu
 * @date 2019年10月28日
 */
public interface OrderRenegeBizService extends RootService {

    /**
     * 查询订单退租信息
     *
     * @param orderCode 订单号
     * @param userId    用户id
     * @return
     */
    OrderRenegeBizDto getOrderRenege(Long orderCode, Integer userId);

    /**
     * 新增退租信息
     *
     * @param createBizDto
     * @return
     * @throws Exception
     * @throws BizException
     */
    Boolean createRenege(OrderRenegeCreateBizDto createBizDto) throws BizException, Exception;

    /**
     * 取消退租
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    Boolean modifyCancel(OrderRenegeCancelModifyBizDto modifyBizDto) throws BizException, Exception;

    /**
     * 修改退租收款人信息
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    Boolean modifyPayee(OrderRenegePayeeModifyBizDto modifyBizDto) throws BizException, Exception;


    /**
     * 发起收/付款
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    Boolean modifyCost(OrderRenegeCostModifyBizDto modifyBizDto) throws BizException, Exception;

    /**
     * 退款完成
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    Boolean modifyComplete(OrderRenegeCompleteModifyBizDto modifyBizDto) throws BizException, Exception;

    /**
     * 退租完成
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    boolean modifyFinish(OrderRenegeCompleteModifyBizDto modifyBizDto);

    /**
     * 退租还车修改信息-大屏还车
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    Boolean modifyReturnCar(OrderReturnCarModifyBizDto modifyBizDto) throws BizException, Exception;

    /**
     * 退租收车修改信息-op收车
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    Boolean createRecycleCar(RecycleCarsCreateBizDto modifyBizDto) throws BizException, Exception;


    /**
     * 退租缴费支付修改
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    Boolean modifyPay(OrderPayModifyBizDto modifyBizDto);

    /**
     * 退租解除协议确认修改
     *
     * @param modifyBizDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    Boolean modifyContractRescission(OrderRenegeContractRescissionModifyBizDto modifyBizDto) throws BizException, Exception;

    /**
     * 查询协商退租列表
     *
     * @param params   查询参数
     * @param pageNum  页数
     * @param pageSize 每页条数
     * @return Paged
     */
    Paged<OrderNegotiateRenegeDto> getNegotiateRenegePaged(Map<String, Object> params,
                                                           int pageNum, int pageSize);
}
